/**
 * 
 */
package com.ideal.framework.pagetag.dao;

import java.util.List;

import org.springframework.dao.DataAccessException;

import com.ideal.framework.pagetag.DataList;

/**
 * @author mengmingkuo
 * @create time 2008-7-15 13:43:00
 */
public interface IEntityDao {
	/**
	 * 可以查询单条数据,返回一个继承Entity类的JavaBean
	 */
	public abstract Object queryForObject(String s,Object object)throws DataAccessException;
	 /**
	  * 查询列表操作,String参数是调用ibatis的id,entity是继承此类的JAVABean
	  */
	public abstract List<Object> queryList(String method,Object object) throws DataAccessException;
	
	public abstract List<Object> queryList(String method) throws DataAccessException;
	/**
	 * 分页查询操作,entity是传递一个继承Entitye的JavaBean,
	 * pagenum是传递的每页显示条数,npage是传递的下一页参数,method是调用ibatis的id
	 */
	public abstract DataList queryList (Entity object, int i, int j, String s)throws DataAccessException;
	
	public abstract Integer getCount(Entity object, String s)throws DataAccessException;
	/**
	 * 删除操作,String参数是调用ibatis的id,entity是继承此类的JAVABean
	 */
	public abstract int delete(String s,Object object)throws DataAccessException;
	/**
	 * 更新操作,String参数是调用ibatis的id,entity是继承此类的JAVABean
	 */
	public abstract int update(String s,Object object)throws DataAccessException;
	/**
	 * 新建操作,String参数是调用ibatis的id,entity是继承此类的JAVABean
	 */
	public abstract void insert(String s,Object object)throws DataAccessException;
	
}
